#pragma once


#include "Device.h"

#include <d3dx10.h>


namespace Crows3D
{
   struct VertexPositionTextureNormal
   {
      D3DXVECTOR4 position; // position
      D3DXVECTOR2 texture;  // TEXTURE COORDINATE     
      D3DXVECTOR3 normal;   // NORMAL
   };


   class Mesh
   {
   protected:
      ID3D11Buffer         *vb; // Our vertex buffer representation
      ID3D11Buffer         *ib; // Our index buffer representation

      unsigned int         nIndices;

   public:
      Mesh(void);
      ~Mesh(void);

      // Initialize our buffers
      bool Initialize(Crows3D::Device *dev, unsigned long numVerts, VertexPositionTextureNormal verts[], 
                                            unsigned long numIndices, DWORD indices[]);

      bool InitializeCube(Crows3D::Device *dev);

      void Commit(Crows3D::Device *dev);

      void Render(Crows3D::Device *dev);
   };
}